#include <stdio.h>
#include <iostream>
#include "findSubString.h"

using namespace std;

int main(int argc, char **argv) {
	if (argc != 3) {
		cout << "Usage: " << argv[0] << " str word" << endl;
		return 0;
	}

	char str[255];
	char word[64];

	sprintf(str, "%s", argv[1]);
	sprintf(word, "%s", argv[2]);

	unsigned int start, end;
	
	if (!findSubString(str, word, start, end)) {
		cout << "Word is not included in the string!" << endl;
	}

	cout << "String is: " << endl;
	cout << str << endl << endl;
	
	cout << "Word is: " << word << endl;
	cout << "Start loc: " << start << endl;
	cout << "End loc: " << end << endl;

	return 0;
}

